package com.crscd.ai.config;

import dev.langchain4j.memory.ChatMemory;
import dev.langchain4j.memory.chat.MessageWindowChatMemory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * Created with IntelliJ IDEA.
 *
 * @author： liuziyang
 * @date： 2025/9/23-22:03
 * @description：
 * @modifiedBy：
 * @version: 1.0
 */
@Configuration
public class MemoryChatAssistantConfig {

  @Bean
  public ChatMemory chatMemory() {
    return MessageWindowChatMemory.withMaxMessages(10);
  }
}
